My meme

My meme compares the two subjects Statistics and Data Science, I created it to highlight how one subject is more interesting than the other.

library(magick)

# getting winnie pictures
winnie_average <- image_read('winnie-average.gif') %>%
  image_scale(500)  

winnie_tux <- image_read('winnie-tux.jpg') %>%
  image_scale(500)

# creating text for meme
stat_text <- image_blank(width = 500, 
                          height = 500, 
                          color = "#FFFFFF") %>%
  image_annotate(text = "Statistics",
                 color = "#000000",
                 size = 80,
                 font = "Impact",
                 gravity = "center")

data_text <- image_blank(width = 500, 
                          height = 500, 
                          color = "#FFFFFF") %>%
  image_annotate(text = "Data Science",
                 color = "#000000",
                 size = 80,
                 font = "Impact",
                 gravity = "center")

# combining image and text to create rows of meme
first_row <- c(winnie_average, stat_text) %>%
  image_append()

second_row <- c(winnie_tux, data_text) %>%
  image_append()

# combining rows to create meme
meme <- c(first_row, second_row) %>% 
  image_append(stack = TRUE)

# saving meme
image_write(meme, "my_meme.png")

My animated GIF

My animated GIF shows the difference between seeing with/without glasses, I created it to showcase how some people with visual impairment see.

library(magick)

# Glasses 
glasses <- image_read('glasses.png') %>%
  image_scale(500)

# clear Wall 
wall <- image_read('wall.jpg') %>%
  image_scale(500)

# blurry wall
blur_wall <- image_blur(wall, 10, 5)

# Create each frame combining glasses, wall and blur wall
frame_1 <- image_composite(wall, glasses, gravity = 'northwest',offset = "+0+0")

frame_2 <- image_composite(blur_wall, image_blur(glasses, 10, 5), gravity = 'northwest',offset = "+0+100")

frame_3 <- blur_wall

frame_4 <- frame_2 <- image_composite(blur_wall, image_blur(glasses, 10, 5), gravity = 'northwest',offset = "+0+100")


# putting frames into animation
frames <- c(frame_1, frame_2, frame_3, frame_3, frame_3, frame_4, frame_1, frame_1)

# creating an animation
animation <- image_morph(frames) %>%
  image_animate(fps = 10)

# saving gif
image_write(animation, "my_animation.gif")
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@100&display=swap');

body {
color:#000000; 
background-color:#91B2C7; 
padding:10px
font-family: 'Montserrat', sans-serif;
font-weight: 600;
}

p {font-weight: 600;}